<script setup>
  import { ref } from 'vue';

  let flag = ref(true);
  let fun = function(){
    flag.value = !flag.value;
  }

</script>

<template>
  <div>
    <span v-show="flag">true</span>
    <input type="button" v-bind:value="'显示'" @click="fun()"/>
  </div>
</template>

<style scoped>
</style>
